/**
 * @author:林南方
 * @create 2025-10-18-15:38
 */

public class Calculator {
    private static int result;
    public void add(int n){
        result=result+n;
    }
    public void substract(int n){
        result=result-n;
    }
    public int getResult() {
        return result;
    }
    public void clear() {
        result=0;
    }
}
